package pile.pay.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * <p>
 * 发送电量使用记录
 * </p>
 *
 * @author 郭天义
 * @since 2024-06-29
 */
@Getter
@Setter
@TableName("sys_grant_power_record")
@ApiModel(value = "GrantPowerRecord对象", description = "发送电量使用记录")
public class GrantPowerRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("发送电量使用记录id")
    @TableId(value = "grant_power_record_id", type = IdType.AUTO)
    private Integer grantPowerRecordId;

    @ApiModelProperty("用户id")
    private Integer memberId;

    @ApiModelProperty("电站id")
    private Integer stationId;

    @ApiModelProperty("发放电量id")
    private Integer dischargingElectricityId;

    @ApiModelProperty("变动电量")
    private BigDecimal power;

    @ApiModelProperty("变动之后电量")
    private BigDecimal powerAfter;

    @ApiModelProperty("变动之前电量")
    private BigDecimal powerBefore;

    @ApiModelProperty("备注")
    private String remarks;

    @ApiModelProperty("类型 1/收入（发放）  2/支出（使用）")
    private Integer type;

    @ApiModelProperty("是否删除，1是0否")
    @TableLogic
    private Integer isDelete;

    @ApiModelProperty("添加时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("删除时间")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;

    @ApiModelProperty("乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty("渠道 1/卫莱电微信小程序  2/卫莱电支付宝小程序 3/阿凡电微信小程序 4/阿凡电支付宝小程序")
    private Integer channel;


}
